#ifndef MUSIC_SEARCH_H
#define MUSIC_SEARCH_H

#include <QWidget>
#include "mainwindow.h"
#include "QStandardItemModel"
#include <QMediaPlayer>
#include <QMediaPlaylist>
#include <QNetworkAccessManager>
namespace Ui {
class music_search;
}
class music;
class music_search : public QWidget
{
    Q_OBJECT

public:
    void parseJon(QByteArray byteArray);
    explicit music_search(QWidget *parent ,music * pMusic);
    ~music_search();


    QStandardItemModel * pModel;
    QMediaPlaylist * playlist;
    QMediaPlayer * player;
    music_search * Music_Search;
    QNetworkAccessManager * manage;
    QString text;
    music * pMusic1;
    QString song_name_ing;//用于存储播放的歌曲名字
    QStringList song_name_list;//用于存储搜索十首歌的歌名
    qint64 song_list_num;//用于存储播放第几首歌曲的顺序
public slots:
    void replyfinished(QNetworkReply * reply);
    void positionChangedslot(qint64 position);

    void durationChangedslot(qint64 duration);

private slots:
    void on_tableView_clicked(const QModelIndex &index);

private:
    Ui::music_search *ui;
};

#endif // MUSIC_SEARCH_H
